package com.ym.medical.domain.param;

import com.ym.common.annotations.CustomConstraint;
import com.ym.common.constant.BeanCovert;
import com.ym.medical.domain.entity.MindEntity;
import com.ym.medical.enums.MindThankSourceEnum;
import com.ym.medical.enums.PaymentStateEnum;
import com.ym.medical.enums.PlaformSourceEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;

import static com.ym.common.constant.ValidRule.Add;
import static com.ym.common.constant.ValidRule.Update;

/**
 * 心意对象 mind
 *
 * @author ym
 * @date 2020-09-02
 */
@ApiModel("心意-修改")
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class MindUpdateMobileParam extends BeanCovert<MindEntity>{

    @ApiModelProperty("关联id")
    @NotNull
    private Long relatedId;

    @ApiModelProperty("被答谢人主键")
    private Long doctorId;

    @ApiModelProperty("答谢金额主键")
    private Long thankMoneyId;

    @ApiModelProperty("答谢备注")
    @Size(max = 2000, message = "答谢备注长度超过{max}", groups = {Add.class, Update.class})
    private String thankContent;

    @ApiModelProperty("创建时间")
    @NotNull(message = "创建时间不能为空", groups = Add.class)
    private Date createTime;

    @ApiModelProperty("答谢来源")
    @NotNull
    @CustomConstraint(MindThankSourceEnum.class)
    @Size(max = 2, message = "答谢来源长度超过{max}", groups = {Add.class, Update.class})
    private String thankSource;

    @ApiModelProperty("支付状态 (01 待支付 02 已支付 03 退费申请中 04 已退费 05支付失败)PaymentStateEnum")
    @Size(max = 2, message = "支付状态 长度超过{max}", groups = {Add.class, Update.class})
    @CustomConstraint(PaymentStateEnum.class)
    private String payState;

    @ApiModelProperty("可空，付款账户")
    @Size(max = 32, message = "可空，付款账户长度超过{max}", groups = {Add.class, Update.class})
    private String payAcc;

    @ApiModelProperty("付款方式")
    @Size(max = 2, message = "付款方式长度超过{max}", groups = {Add.class, Update.class})
    private String payType;

    @ApiModelProperty("支付来源 (01-小程序 02-公众号)")
    @Size(max = 2, message = "支付来源 长度超过{max}", groups = {Add.class, Update.class})
    @CustomConstraint(PlaformSourceEnum.class)
    private String paySource;

    @ApiModelProperty("交易时间")
    private Date tdTime;

}
